class Observer {
  private fun: Function
  constructor (fun: Function) {
    // super()
    // this.target = target
    this.fun = fun
  }

  // 目标对象更新时触发的回调，即收到更新通知后的回调
  update () {
    this.fun()
  }
}

export default Observer
